home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / dlibsrc.arc / MEMCHR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-05  |  172 b   |  12 lines

  1. #include <stddef.h>
  2.  
  3. char *memchr(buf, c, cnt)
  4.     register char *buf, c;
  5.     register int cnt;
  6.     {
  7.     while(cnt--)
  8.         if(*buf++ == c)
  9.             return(--buf);
  10.     return(NULL);
  11.     }
  12.